package io.geekidea.boot.materialrule.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import io.geekidea.boot.materialrule.dto.addMaterialRule;
import io.geekidea.boot.materialrule.dto.updateMaterialRule;
import io.geekidea.boot.materialrule.entity.MaterialRule;
import io.geekidea.boot.materialrule.mapper.MaterialRuleMapper;
import io.geekidea.boot.materialrule.service.MaterialRuleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class MaterialRuleServiceImpl extends ServiceImpl<MaterialRuleMapper,MaterialRule> implements MaterialRuleService {

    @Resource
    private MaterialRuleMapper materialRuleMapper;

    @Override
    public boolean addMaterialRule(addMaterialRule addMaterialRule) {
        return materialRuleMapper.addMaterialRule(addMaterialRule)>0;
    }

    @Override
    public boolean updateMaterialRule(updateMaterialRule updateMaterialRule) {
        return materialRuleMapper.updateMaterialRule(updateMaterialRule)>0;
    }
}
